﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Reflection.Emit;

namespace NMapper
{
    public interface IMapping<TDatabase>
        where TDatabase : IDisposable
    {
        void DefineTransientType(ModuleBuilder module, TypeBuilder type);
        void DefineTransientInitialization(MapContext<TDatabase> mapContext, Type transientType, List<MemberBinding> initializers, ParameterExpression parameterExpression);
        void OnTransientInitialized(MapContext<TDatabase> mapContext, Array transient);
        void MapToOutput(MapContext<TDatabase> mapContext, object transient, object output);
        void MapToInput(MapContext<TDatabase> mapContext, object output, object input);
    }
}